package com.keshe.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 *
 *
 * @author tianfanfan
 * @email 2712855098@qq.com
 * @date 2023-01-02 14:28:26
 */
@Data
@TableName("oms_order")
public class OrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId
	private Integer orderId;

	private String orderSn;

	private Integer userId;

	// 商品总金额
	private BigDecimal commodityAmount;
	// 运费
	private BigDecimal freightAmount;
	// 订单总金额
	private BigDecimal orderAmount;
	// 优惠券金额
	private Integer couponId;
	// 折扣金额
	private  BigDecimal discountAmount;
	// 实际支付金额
	private BigDecimal payAmount;

	private Integer addressId;

	private Integer payType;

	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date payTime;

	private Integer orderStatus;

	private String returnReason;

	private Integer returnType;

	private String returnNote;

	private Integer returnStatus;

	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date createTime;

	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date deliverTime;

	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date takeoverTime;

	private String logisticsSn;

	private String logisticsCompany;

	private String orderCnotes;

	private String orderBnotes;

	private Integer isDeleted;

	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private Date updatedTime;

	private String takeoverName;

	private String takeoverPhone;

	private String takeoverProvince;

	private String takeoverCity;

	private String takeoverDistrict;

	private String takeoverZip;

	private String takeoverAddress;

	@TableField(exist = false)
	private UserEntity user;

	@TableField(exist = false)
	private CouponEntity coupon;

}
